import UserLayout from '@/views/user/layout/index.vue'

export default {
  path: '/user',
  component: UserLayout,
  redirect: '/user/login',
  hidden: true,
  children: [
    {
      path: 'login',
      component: () => import('@/views/user/auth/login.vue'),
      name: 'UserLogin',
      meta: { title: '用户登录' }
    },
    {
      path: 'register',
      component: () => import('@/views/user/auth/register.vue'),
      name: 'UserRegister',
      meta: { title: '用户注册' }
    },
    {
      path: 'home',
      component: () => import('@/views/user/home/index.vue'),
      name: 'UserHome',
      meta: { title: '用户首页', requireAuth: true }
    },
    {
      path: 'mall',
      component: () => import('@/views/user/mall/index.vue'),
      name: 'UserMall',
      meta: { title: '非遗商城' }
    },
    {
      path: 'heritage',
      component: () => import('@/views/user/heritage/index.vue'),
      name: 'UserHeritage',
      meta: { title: '非遗推荐', requireAuth: true }
    },
    {
      path: 'mall/detail/:id',
      component: () => import('@/views/user/mall/detail.vue'),
      name: 'ProductDetail',
      meta: { title: '商品详情' }
    },
    {
      path: 'forum',
      component: () => import('@/views/user/forum/index.vue'),
      name: 'UserForum',
      meta: { title: '非遗论坛', requireAuth: true }
    },
    {
      path: 'orders',
      component: () => import('@/views/user/orders/index.vue'),
      name: 'UserOrders',
      meta: { title: '我的订单', requireAuth: true }
    },
    {
      path: 'orders/confirm',
      component: () => import('@/views/user/orders/confirm.vue'),
      name: 'OrderConfirm',
      meta: { title: '确认订单', requireAuth: true }
    }
  ]
} 